<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">修改页面</block>
<block name="appendheader">
	<!-- Validform_v5.3.2验证框架 -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Validform/css/Validform_v5.3.2.css"/>
	<script type="text/javascript" src="__PUBLIC__/Validform/js/Validform_v5.3.2_min.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-1000").addClass('active');	//选中父菜单
			$("#WebMenu-1005").addClass('active');	//选中当前菜单
		});
		$(function() {
			var editor;
			var myform=$("#myform").Validform({
				tiptype:3,
				label:".label",
				showAllError:true,
				postonce:true,//开启二次提交防御
				ajaxPost:false,
				beforeSubmit:function(curform) {
					//在验证成功后，表单提交前执行的函数，curform参数是当前表单对象。
					lockScreen();
				},
				callback:function(data){
					$.Hidemsg();
				}
			});
			myform.addRule([{
				ele:"#name",
				datatype:"*1-20",
				nullmsg:"请输入页面名称"
			},
			{
				ele:"#url",
				datatype:"*1-100",
				nullmsg:"请输入页面地址"
			},
			{
				ele:"#mark",
				datatype:"*1-20",
				nullmsg:"请输入标识"
			},
			{
				ele:"#ico",
				datatype:"*1-20",
				nullmsg:"请输入页面图标"
			},
			{
				ele:"#email",
				datatype:"e",
				ignore:"ignore"
			}]);
		});
	</script>
</block>
<!-- 当前位置 -->
<block name="breadcrumb">
	<div class="page-header pull-left">
		<div class="page-title">修改页面</div>
	</div>
	<ol class="breadcrumb page-breadcrumb pull-left">
		<li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="__APP__?g=Admin&m=Page&a=index">页面管理</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li class="active">修改页面</li>
	</ol>
</block>
<block name="main_content">
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-blue">
				<div class="panel-heading">修改页面</div>
				<div class="panel-body pan">
					<form id="myform" name="myform" action="__APP__?g=Admin&m=Page&a=update" method="post" class="form-horizontal form-seperated">
						<div class="form-body">
							<div class="form-group">
								<label for="name" class="col-md-2 control-label">页面名称 <span class='require'>*</span></label>
								<div class="col-md-7"> 
									<input type="text" id="name" name="name" value="{$data.name}" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="parentid" class="col-md-2 control-label">父页面 <span class='require'>*</span></label>
								<div class="col-md-7">
									<select id="parentid" name="parentid" class="form-control">
										<option value="0">[0]&nbsp;添加顶级页面</option>
										{$categorys}
									</select>
								</div>
							</div>
							<div class="form-group">
								<label for="url" class="col-md-2 control-label">URL <span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="url" name="url" value="{$data.url}" class="form-control" />
									<span class="help-block">示例：g=Group&m=Module&a=index</span>
								</div>
							</div>
							<div class="form-group">
								<label for="mark" class="col-md-2 control-label">标识 <span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="mark" name="mark" value="{$data.mark}" class="form-control" />
									<span class="help-block">标识用于选中当前操作菜单，不能重复。格式：WebMenu-1000</span>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">页面功能</label>
								<div class="col-md-7" >
									<textarea id="intro" name="intro" style="height:120px;" class="form-control">{$data.intro}</textarea>
								</div>
							</div>
							<div class="form-group">
								<label for="ico" class="col-md-2 control-label">图标样式 <span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="ico" name="ico" value="{$data.ico}" class="form-control" />
									<span class="help-block">示例： fa-desktop（对应图标css样式名称，fa-desktop表示 <i class="fa fa-desktop"></i>）</span>
								</div>
							</div>
							<div class="form-group">
								<label for="seq" class="col-md-2 control-label">显示序号 </label>
								<div class="col-md-7">
									<input type="text" id="seq" name="seq" value="{$data.seq}" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">打开方式 <span class='require'>*</span></label>
								<div class="col-md-7">
									<div class="radio">
										<volist name="target_list" id="vo">
											<label class="radio-inline"><input type="radio" name="target" value="{$vo.id}" <eq name="data.target" value="$vo.id">checked</eq> />&nbsp;{$vo.name} </label>
										</volist>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">状态 <span class='require'>*</span></label>
								<div class="col-md-7">
									<div class="radio">
										<volist name="status_list" id="vo">
											<label class="radio-inline"><input type="radio" name="status" value="{$vo.id}" <eq name="data.status" value="$vo.id">checked</eq> />&nbsp;{$vo.name} </label>
										</volist>
									</div>
								</div>
							</div>
						</div>
						<div class="form-actions text-left pal">
							<div class="col-md-offset-2 col-md-7">
								<input type="hidden" name="id" value="{$data.id}" />
								<button type="submit" class="btn btn-primary">提交</button>&nbsp;&nbsp;
								<button type="button" class="btn btn-green" onclick="history.go(-1);">取消</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</block>